<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('修改客户')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-employee-edit" th:object="${employee}">
			<input id="id" name="id" type="hidden" th:field="*{id}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">员工名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" th:field="*{name}" id="employeeName" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">邮箱：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="email" th:field="*{email}" id="employeeOriginalPrice" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">年龄：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="age" th:field="*{age}" id="employeeTime" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">是否是管理员：</label>
				<div class="col-sm-8">
					<select name="admin">
						<option th:each="dept:${@dict.getType('sys_admin')}"
								th:value="${dept.value}"
								th:text="${dept.label}"
								th:selected="${employee.dept.id==dept.value}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">是否冻结：</label>
				<div class="col-sm-8">
					<select name="status">
						<option th:each="status:${@dict.getType('sys_status')}"
								th:value="${status.value}"
								th:text="${status.label}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">所在部门：</label>
				<div class="col-sm-8">
					<select name="dept.id" th:with="type=${@dict.getType('sys_dept')}">
						<option th:each="dict:${type}"
								th:value="${dict.value}"
								th:text="${dict.label}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入职时间：</label>
				<div class="col-sm-8">
					<li class="select-time">
						<label>入职时间：</label>
						<input type="text" class="time-input" id="hiredate" placeholder="入职时间" name="hiredate"/>
					</li>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="common/include :: footer" />
	<th:block th:include="common/include :: datetimepicker" /><!--注意导包必须在这-->
	<script type="text/javascript">
		var prefix = ctx + "/business/employee";
		
		function submitHandler() {
			$.operate.save(prefix + "/edit", $('#form-employee-edit').serialize());
	    }
	</script>

</body>
</html>
